/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 18-jun-2010, 22:52:56
 */

package geauto;

/**
 *
 * @author Diego
 */
public class Principal extends javax.swing.JFrame {

    /** Creates new form Principal */
    public Principal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelPrincipal = new javax.swing.JTabbedPane();
        barrraMenu = new javax.swing.JMenuBar();
        menuAdministrar = new javax.swing.JMenu();
        etiquetaEmpleados = new javax.swing.JMenuItem();
        etiquetaProductos = new javax.swing.JMenuItem();
        etiquetaClientes = new javax.swing.JMenuItem();
        menuTerminar = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        menuAdministrar.setText("Administrar");

        etiquetaEmpleados.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        etiquetaEmpleados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Iconos/icons/user_red.png"))); // NOI18N
        etiquetaEmpleados.setText("Empleados");
        etiquetaEmpleados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                etiquetaEmpleadosActionPerformed(evt);
            }
        });
        menuAdministrar.add(etiquetaEmpleados);

        etiquetaProductos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        etiquetaProductos.setText("Productos");
        etiquetaProductos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                etiquetaProductosActionPerformed(evt);
            }
        });
        menuAdministrar.add(etiquetaProductos);

        etiquetaClientes.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        etiquetaClientes.setText("Clientes");
        etiquetaClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                etiquetaClientesActionPerformed(evt);
            }
        });
        menuAdministrar.add(etiquetaClientes);

        barrraMenu.add(menuAdministrar);

        menuTerminar.setText("Terminar");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setText("Salir");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        menuTerminar.add(jMenuItem1);

        barrraMenu.add(menuTerminar);

        setJMenuBar(barrraMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void etiquetaEmpleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_etiquetaEmpleadosActionPerformed
        Empleados empleado = new Empleados();
        empleado.setVisible(true);
        empleado.setName("Empleados");
        panelPrincipal.add(empleado);
    }//GEN-LAST:event_etiquetaEmpleadosActionPerformed

    private void etiquetaProductosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_etiquetaProductosActionPerformed
        Productos producto = new Productos();
        producto.setVisible(true);
        producto.setName("Productos");
        panelPrincipal.add(producto);
    }//GEN-LAST:event_etiquetaProductosActionPerformed

    private void etiquetaClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_etiquetaClientesActionPerformed
        Clientes cliente = new Clientes();
        cliente.setVisible(true);
        cliente.setName("Clientes");
        panelPrincipal.add(cliente);
    }//GEN-LAST:event_etiquetaClientesActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar barrraMenu;
    private javax.swing.JMenuItem etiquetaClientes;
    private javax.swing.JMenuItem etiquetaEmpleados;
    private javax.swing.JMenuItem etiquetaProductos;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenu menuAdministrar;
    private javax.swing.JMenu menuTerminar;
    private javax.swing.JTabbedPane panelPrincipal;
    // End of variables declaration//GEN-END:variables

}
